﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;

using OnPowerShapeAddin.ObjectModel.OneNote2010XMLSchema;

namespace OnPowerShapeAddin
{
    class PageUpdateContext : IDisposable
    {
        private readonly OneNoteHelper helper;

        public Page Page
        {
            get;
            private set;
        }

        public PageUpdateContext(OneNoteHelper onHelper, string pageId)
        {
            this.Page = new Page();
            this.Page.ID = pageId;
            this.helper = onHelper;
        }

        public void Dispose()
        {
            helper.UpdatePageContent(this.Page);
        }
    }
}
